package com.crowntit.types.design.framework.link.model2;

import com.crowntit.types.design.framework.link.model2.chain.BusinessLinkedLink;
import com.crowntit.types.design.framework.link.model2.handler.ILogicHandler;

public class LinkArmory<T, D, R> {
    private final BusinessLinkedLink<T, D, R> logicLink;

    @SafeVarargs
    public LinkArmory(String name, ILogicHandler<T, D, R>... logicHandlers) {
        this.logicLink = new BusinessLinkedLink<>(name);
        for (ILogicHandler<T, D, R> logicHandler : logicHandlers) {
            logicLink.add(logicHandler);
        }
    }

    public BusinessLinkedLink<T, D, R> getLogicLink(){
        return logicLink;
    }
}
